import yaml
import os
from pytest知识体系.utils.readfile import get_path
def get_path(filename):
    root_path=(os.path.dirname(os.path.dirname(__file__)))
    new_path=os.path.join(root_path,"datas",filename)
    return new_path
def read_yaml(filename):
    with open(get_path(filename),'r',encoding='utf-8') as f:
        return yaml.safe_load(f)

if __name__=="__main__":
    res=read_yaml("login.yaml")
    print(type(res))
    print(res)

def get_log_path():
    root_path = (os.path.dirname(os.path.dirname(__file__)))
    new_path = os.path.join(root_path, "logs")
    return new_path
if __name__=="__main__":
    print(get_log_path())